package day05;

public class ExtendedExercises {
    public static void main(String[] args) {
        int num=0;
        for(int i=2;i<=100;i+=2){
            num=num+i;
        }
    System.out.println(num);
   //==================================================
        int num1=1;
        for (int i=1;i<=8;i++){
            num1=num1*i;
        }
        System.out.println(num1);

        int a;
        for (int i=1;i<25;i+=2){
            System.out.println();
            for (a=0;a<i;a++){
                System.out.print("*");
            }
        }
        System.out.println();
    //==================================================
        int[]arr=new int[10];
        for (int i=0;i<arr.length;i++){
            arr[i]=(int)(Math.random()*1000);
            System.out.println(arr[i]);
        }
        int max=arr[0];
        int min=arr[0];
        for (int i=1;i<arr.length;i++){
            if (max<arr[i]){
                max=arr[i];
            }
        }
        System.out.println("最大值"+max);
        for(int i =1;i<arr.length;i++){
            if (min>arr[i]){
                min=arr[i];
            }
        }
        System.out.println("最小值"+min);


    }
}
